<template>
  <div style="min-height:100vh;">
    <!--头部-->
    <Top />

    <el-card class="box-card" style="margin:30px auto 0 auto;width:90%;">
      <div class="text item" style="font-size:30px;">
        <div style="font-size:40px;font-weight:bold;text-align:center;">联系作者</div>
        <div style="text-align: center;font-size:30px;"><span style="font-weight:bolder;font-size:33px;">Email</span>：2513050886@qq.com</div>
        <div style="text-align: center;font-size:30px;"><span style="font-weight:bolder;font-size:33px;">QQ</span>：2513050886</div>
        <div style="text-align: center;font-weight:bolder;font-size:33px;">微信</div>
        <div class="img">
          <img src="../assets/image/wx.jpg">
        </div>
      </div>
    </el-card>

    <el-card class="box-card" style="margin:30px auto 0 auto;width:90%;">
      <div class="text item" style="font-size:30px;">
        <div style="font-size:40px;font-weight:bold;text-align:center;margin-bottom:20px;">站点信息</div>
        <div style="text-align: center;font-size:36px;">文章总数：{{this.$store.getters.getblogCount}}篇</div>
        <div style="text-align: center;font-size:36px;">访问总数：{{this.$store.getters.getviewCount}}次</div>
        <div style="text-align: center;font-size:36px;">评论总数：{{commentCount}}条</div>
      </div>
    </el-card>

    <!--占位-->
    <div style="height:200px;"></div>
  </div>
</template>

<script>
import Top from '@/components/move/Top'
export default {
  name: 'Author',
  components:{Top},
  data () {
    return {
      commentCount: 0
    }
  },

  created(){
    this.initData()
  },
  methods: {
//初始化底部数据
    initData(){
      const _this = this
      //请求获取总评论数
      this.axios.get('/comment/getCommentCount').then(resp=>{
        // console.log(resp)
        _this.commentCount = resp.data
      }).catch((error) => {
        // console.log(error)
      })
    }
  }
}
</script>

<style scoped>
.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 480px;
}

.img{
  text-align: center;
}
</style>